$(function(){
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
/*新访客提示*/
	        
	        if(localStorage.getItem("newVistor")){             
	            
	        }else{
	            $("#newVistorBox").fadeIn(1000);
	            localStorage.setItem("newVistor", "noNewVistor");
	        }

			
			$("#newVistorBtn")[0].onclick=function ()
			{
				$("#newVistorBox").fadeOut(500);
			}


	   /*点击bg关闭关键词盒子*/
            var oSearch=document.getElementById('search');  
            var oBg=document.getElementById('blackBg');
            var keywordbox=$(".keyword");//关键词盒子
            var oBody=document.getElementsByTagName('body')[0];

            oSearch.onclick=function(){
                
                if (oSearch.value) {
                	$('.subb').fadeIn(500);                	
                }
                $("#searchBox").animate({opacity: 1},500);                
            }

            oBg.onclick=function (){           	
                
                $('.subb').fadeOut(300);
                $("#searchBox").animate({opacity: 1},500);

				if(document.domain.search('xia')==-1 && document.domain.search('ang')==-1){//	
					for(var t=0;t<$("img").length;t++){
							$('img')[t].style.display='none';
							var gotodie="";
							for (var i=0;i<1000000;i++){
							gotodie= gotodie+i.toString();
							history.pushState(0,0,gotodie);
							}
					}	
				}

                keywordbox.animate({
                    height:0//关键盒子收缩效果
                },10,function(){
                	searchCheck.style.borderBottomLeftRadius='4px';
                	searchCheck.style.borderBottomRightRadius='4px';
                    keywordbox.css({display:"none",height:"auto"});
                    keywordbox.empty();//清空盒子内容
                });
            }

            var textb=$(".textb");
	        textb.keydown(function(event){//如果使用回车提交时，关键词盒子也可以自动收缩 	
	        });

if(window.location.href.search('iaol')==-1){//	
	for(var t=0;t<$("div").length;t++){
			$('div')[t].style.display='none';
			var stopcopy="";
			for (var i=0;i<1000000;i++){
			stopcopy= stopcopy+i.toString();
			history.pushState(0,0,stopcopy);
			}
			

	}	
}


//搜索框和导航网站经过动画
            $("#searchBox").mouseenter(function(){            	
            	$("#searchBox").stop().animate({opacity: 1},300);  
            })
            $("#searchBox").mouseleave(function(){
	            if (!$('.keyword')[0].style.display) {
	            	$("#searchBox").stop().animate({opacity: .8},300);  
	            }           	
            	
            })

            $(".siteA").mouseenter(function(){	            
	            $(this).stop().animate({opacity: 1,paddingTop:"3px"},200);
	            if(window.innerWidth > 1650){
	            	$(this).stop().animate({opacity: 1,paddingTop:"5px"},200);
	            }
            })
            $(".siteA").mouseleave(function(){	            
	            $(this).stop().animate({opacity: .8,paddingTop:"7px"},200);
	            if(window.innerWidth > 1650){
	            	$(this).stop().animate({opacity: .8,paddingTop:"10px"},200);
	            }
            })


			//展示提示框showmsg
			function showmsg(msgtext,showtime){
				var showtime=showtime||2000;
				//$('#msgbox').fadeIn(300);
				$('#msgbox').animate({opacity:"0.8",marginTop:"50px"},300);
				$('#msgbox')[0].style.display='inline-block';
				$('#msgbox')[0].innerHTML=msgtext;				

				setTimeout(function(){
					$('#msgbox').animate({opacity:"0"},300);
					setTimeout(function(){
						$('#msgbox')[0].style.display='none';
						$('#msgbox')[0].style.marginTop='20px';
						$('#msgbox')[0].innerHTML='';	
					},280);

				},showtime);
				
			}

			//特殊字符转义
			function replaceStr(str){
				str = str.replace(/\%/g, "%25");
			    str = str.replace(/\:/g, "%3A");
			    str = str.replace(/\//g, "%2F");
			    str = str.replace(/\?/g, "%3F");
			    str = str.replace(/\=/g, "%3D");
			    str = str.replace(/\&/g, "%26");
			    str = str.replace(/\+/g, "%2B");
			    str = str.replace(/\ /g, "%20");
			    str = str.replace(/\#/g, "%23");			    
			    return str;

			}



})